NS BASIC Announces Winner of first program contest!
The winner of NS BASIC Corporation's first program contest is Richard Van Alstyne of New Brunswick, New Jersey. His program, "Dive", helps scuba divers with the calculations and record keeping needed to make multiple deep dives safely. It takes the Newton to a place no one would dream of taking a notebook computer: the wet, heaving deck of a dive boat.
It was selected because of its good use of a number of NS BASIC extensions: windows, buttons, handwritten input and popup pick lists. The complete listing of the program is at the end of this message.
Richard reports that he's currently putting the finishing touches on a new version of the program, where the results of each dive are saved to a file. He originally wrote the program using QuickBASIC on a PC, and reports the program came over into NS BASIC without a whole lot of trouble. You can
email him at ravajr@aol.com.
Congratulations, Richard! An NS BASIC T Shirt is on its way to you.
Keep you eyes open: we'll be announcing the next contest soon. For more information or to order NS BASIC, call (416) 264-5999 or fax (416)264-5888. As always, we can also be reached on the internet at gh@hookup.net.
DIVE: by Richard van Alstyne
You can run this on your Newton by cutting and pasting to the serial
connection within NS BASIC. Be careful of the long lines!
0001 DIM RepGro9[10],SurInt9[10],RepGro09[10],MaxDep9[10],ResNit9[10],
BotTim9[10],RepGro19[10]
0010 CLS
0100 LET W0Spec.ViewBounds={top:2,bottom:14,left:4,right:235}
0101 LET W0Spec.ViewFont={family:'geneva,face:0,size:10}
0102 LET W0Spec.ViewJustify=2
0103 WINDOW W0Num,W0Spec
0104 SHOW W0Num
0105 WPRINT W0Num,"DIVE PROFILE 0.5b RICHARD VAN ALSTYNE"
0110 LET W1Spec.ViewBounds={top:18,bottom:136,left:5,right:132}
0111 LET W1Spec.ViewFont={family:'geneva,face:0,size:10}
0112 LET W2Spec.ViewJustify=0
0113 WINDOW W1Num,W1Spec
0114 SHOW W1Num
0120 LET W2Spec.ViewBounds={top:18,bottom:30,left:136,right:234}
0121 LET W2Spec.ViewFont={family:'geneva,face:0,size:10}
0122 LET W2Spec.ViewJustify=2
0123 LET W2Spec.GOTO=2000
0124 WINDOW W2Num,W2Spec
0125 SHOW W2Num
0126 WPRINT W2Num,"REPETATIVE GROUP"
0130 LET W3Spec.ViewBounds={top:34,bottom:46,left:136,right:234}
0131 LET W3Spec.ViewFont={family:'geneva,face:0,size:10}
0132 LET W3Spec.ViewJustify=2
0133 LET W3Spec.GOTO=2050
0134 WINDOW W3Num,W3Spec
0135 SHOW W3Num
0136 WPRINT W3Num,"SURFACE INTERVAL"
0140 LET W4Spec.ViewBounds={top:50,bottom:62,left:136,right:234}
0141 LET W4Spec.ViewFont={family:'geneva,face:0,size:10}
0142 LET W4Spec.ViewJustify=2
0143 LET W4Spec.GOTO=2100
0144 WINDOW W4Num,W4Spec
0145 SHOW W4Num
0146 WPRINT W4Num,"MAXIMUM DEPTH"
0150 LET W5Spec.ViewBounds={top:66,bottom:78,left:136,right:234}
0151 LET W5Spec.ViewFont={family:'geneva,face:0,size:10}
0152 LET W5Spec.ViewJustify=2
0153 LET W5Spec.GOTO=2150
0154 WINDOW W5Num,W5Spec
0155 SHOW W5Num
0156 WPRINT W5Num,"BOTTOM TIME"
0160 LET W6Spec.ViewBounds={top:82,bottom:94,left:136,right:234}
0161 LET W6Spec.ViewFont={family:'geneva,face:0,size:10}
0162 LET W6Spec.ViewJustify=2
0163 LET W6Spec.GOTO=0900
0164 WINDOW W6Num,W6Spec
0165 SHOW W6Num
0166 WPRINT W6Num,"EVALUATE"
0170 LET W7Spec.ViewBounds={top:98,bottom:110,left:136,right:164}
0171 LET W7Spec.ViewFont={family:'geneva,face:0,size:10}
0172 LET W7Spec.ViewJustify=2
0173 LET W7Spec.GOTO=2200
0174 WINDOW W7Num,W7Spec
0175 SHOW W7Num
0176 WPRINT W7Num,"PREV"
0180 LET W8Spec.ViewBounds={top:98,bottom:110,left:168,right:195}
0181 LET W8Spec.ViewFont={family:'geneva,face:0,size:10}